package com.kingyun.gpsinspection.purificationservice.dao.mapper.tdm;


import com.kingyun.gpsinspection.purificationservice.facade.model.tdm.WorkOrder;
import com.kingyun.gpsinspection.purificationservice.facade.model.tdm.WorkOrderVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TdmWorkOrderMapper {
    int deleteByPrimaryKey(String workOrderId);

    int insert(WorkOrder record);

    int insertSelective(WorkOrder record);

    WorkOrder selectByPrimaryKey(String workOrderId);

    int updateByPrimaryKeySelective(WorkOrder record);

    int updateByPrimaryKey(WorkOrder record);

    int insertNew(WorkOrder record);

    int updateByTaskIdSelective(WorkOrder record);

    List<WorkOrder> queryList(WorkOrder workOrder);

    Integer queryCount(WorkOrder workOrder);

    List<WorkOrderVo> queryConfirmList(WorkOrder workOrder);

    Integer queryConfirmCount(WorkOrder workOrder);

    List<WorkOrder> findListByTaskId(String taskId);

    List<WorkOrderVo> findVoListByTaskId(String taskId);

    int insertByList(List<WorkOrderVo> workOrderVoList);

    WorkOrderVo queryByPrimaryKey(String workOrderId);

    int deleteByTaskId(String taskId);

    int updateStatusEnableByTaskId(String taskId);

    /**
     * 超期工单总数
     */
    Integer queryOverdueWorkOrderCount(String orgId);

    /**
     * 通过任务
     */
    int updateOrgIdByTaskId(@Param("id") String id, @Param("orgId") String orgId);
}